package com.parking.mgr.useraccount.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.parking.mgr.common.pojo.base.entity.BaseEntity;
import com.parking.mgr.common.pojo.base.node.BaseTreeNode;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @ClassName BasicMenuEntity
 * @Description 功能菜单对象
 * @Auther: zhijianpu
 * @Date: 2023/5/18
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("t_basic_menu")
public class BasicMenuEntity extends BaseEntity implements BaseTreeNode {

    /**
     * 主键
     */
    @TableId(type = IdType.INPUT, value = "pk_id")
    private String id;

    /**
     * 所属上级
     */
    private String  fkParentId;

    /**
     * 名称
     */
    private String fName;

    /**
     * element图标
     */
    private String fElementIcon;

    /**
     * logo图片文件url
     */
    private String fLogoImgUrl;

    /**
     * logo图片文件id
     */
    private String fLogoImgFileId;

    /**
     * logo图片文件后缀名
     */
    private String fLogoImgFileSuffix;

    /**
     * 功能菜单url
     */
    private String fUrl;

    /**
     * 是否是入口功能菜单
     */
    private String fEnterState;

    /**
     * 排序编号
     */
    @TableField(fill = FieldFill.INSERT)
    private Integer fSortNumber;

    /**
     * 子节点（表中不存在，用于构造树）
     */
    @TableField(exist = false)
    private List children;


    @Override
    public void setChildren(List children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return "BasicMenuEntity{" +
                "id=" + id +
                '}';
    }
}
